Home:ALL Converter>Mongodb cluster Kubernetes Stateful set is not deleting

Mongodb cluster Kubernetes Stateful set is not deleting

Ask Time:2021-12-25T18:06:01         Author:Anonymous Creator

Json Formatter

I have created Mongodb stateful set using mongodb kubernetes operator.

Now I want to delete that stateful set from kubernetes dashboard, but it is getting recreated again and again.

How do we delete stateful set permanently so that it doesn't get created again.

Author:Anonymous Creator,eproduced under the CC 4.0 BY-SA copyright license with a link to the original source and this disclaimer.
Link to original article:https://stackoverflow.com/questions/70479256/mongodb-cluster-kubernetes-stateful-set-is-not-deleting
Harsh Manvar :

\nHow do we delete stateful set permanently so that it doesn't get\ncreated again.\n\nList and check the name of statefulset\nkubectl get statefulsets -n <namespace name>\n\nCommand to delete the stateful set permanently\nkubectl delete statefulset <Mongo statefulset name> -n <namespace name>\n\nUpdate\nTry deleting the CRD also\nkubectl get crd\n\ndelete CRD for mongo\nkubectl delete crd <CRD name>\n",
2021-12-25T10:59:31
KubePony :

Are you trying to delete a pod or the Stateful set itself?\nTry to run:\nkubectl scale sts <Stateful Set name> --replicas=0 -n <your namespace>\n",
2021-12-25T10:49:58
yy